import Vue from 'vue';
import Vuex from 'vuex';
Vue.use(Vuex);
const store = new Vuex.Store({
	state: {
		userInfo: uni.getStorageSync('userInfo'),// 用户信息
		userlocation:uni.getStorageSync('userlocation'),// 用户定位
	},
	mutations: {
	   ADD_USER(state, val) {
	     state.userInfo = val;
		 uni.setStorageSync('userInfo', val)
	   },
	   ADD_LOCATION(state, val) {
	     state.userlocation = val;
	   		 uni.setStorageSync('userlocation', val)
	   },
	   
	   
	},
	actions: {
      
	},
	getters: {

	}
});

export default store;
